// vite.config.ts
import { defineConfig, loadEnv } from "file:///Users/jack/owner/ticket-o2o-admin/node_modules/vite/dist/node/index.js";
import svgr from "file:///Users/jack/owner/ticket-o2o-admin/node_modules/vite-plugin-svgr/dist/index.mjs";
import react from "file:///Users/jack/owner/ticket-o2o-admin/node_modules/@vitejs/plugin-react/dist/index.mjs";
import autoprefixer from "file:///Users/jack/owner/ticket-o2o-admin/node_modules/autoprefixer/lib/autoprefixer.js";
import { fileURLToPath, URL } from "node:url";
import { createHtmlPlugin } from "file:///Users/jack/owner/ticket-o2o-admin/node_modules/vite-plugin-html/dist/index.mjs";
var __vite_injected_original_import_meta_url = "file:///Users/jack/owner/ticket-o2o-admin/vite.config.ts";
var vite_config_default = defineConfig((config) => {
  const mode = config.mode;
  const envDir = "./env";
  const envPrefix = ["ENV"];
  const getEnv = (key) => {
    return loadEnv(mode, envDir, envPrefix)[key];
  };
  return {
    envDir,
    envPrefix,
    build: {
      outDir: "./build",
      rollupOptions: {
        input: {
          index: "./index.html"
        }
      }
    },
    server: {
      host: "0.0.0.0"
    },
    css: {
      postcss: {
        plugins: [autoprefixer(["Last 5 versions"])]
      },
      preprocessorOptions: {
        less: {
          javascriptEnabled: true
        }
      }
    },
    resolve: {
      alias: {
        "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url)),
        "@@": fileURLToPath(new URL("./", __vite_injected_original_import_meta_url))
      }
    },
    plugins: [
      react(),
      svgr(),
      createHtmlPlugin({
        pages: [
          {
            filename: "index",
            template: "./index.html",
            injectOptions: {
              data: {
                title: getEnv("ENV_APP_NAME")
              }
            }
          }
        ]
      })
    ]
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvamFjay9v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